<template>
  <div class="list" :class="{ isPc: fun.isPc() }">
    <c-title :hide="false" :text="'律所管理'"></c-title>
    <van-search v-model="search" placeholder="请输入搜索关键词" />
    <lawyerPlatform :httpUrl="httpUrl" :search="search" :lawyerId="lawyerId" />
    <div class="btn" :style="fun.isPc()?'width:375px':'width:100%'">
       <van-button color="#daa032" @click.stop  v-clipboard:copy="type_link" v-clipboard:success="onCopy">邀请律师</van-button>
    </div>
  </div>
</template>

<script>
import {Toast} from "vant";
import lawyerPlatform from "../components/lawyer-platform";
export default {
  components: { lawyerPlatform },
  data() {
    return {
      httpUrl: "plugin.lawyer-platform.frontend.controllers.lawyer-firm.getLawyerList",
      lawyerId: "",
      search: ""
    };
  },

  mounted() {},
  computed:{
    type_link(){
      let current_path = window.location.href,
        id=localStorage.getItem("uid")
        current_path =  current_path.replace(`${this.$route.path}`,'applyFor?apply_for=lawYerManagement&share=lawYerManagement&merchant_member_id='+id);
       current_path= current_path.replace("?i","&i")
      return current_path
    }
  },
  methods: {
    handle() {
      this.$router.push(this.fun.getUrl("lawyerPlatformApplyFor", {}, { apply_for: "lawYerManagement" }));
    },
    // 复制链接
    onCopy() {
      Toast({
        message: "复制成功",
        position: "bottom",
        duration: 5000
      });
    },
  }
};
</script>

<style lang="scss" scoped>
.isPc {
  max-width: 375px;
}
.btn {
  position: absolute;
  width: 100%;
  bottom: 0;
  background-color: #ffffff;
  box-shadow: 0px -2px 7px 0px rgba(213, 213, 213, 0.59);
  padding: 0.5714rem 1.7857rem;
  ::v-deep .van-button--normal {
    width: 100%;
    border-radius: 0.3571rem;
  }
}
.van-search__content {
  border-radius: 1rem !important;
}
.list {
  background-color: #fff;
  padding-bottom: 1rem;
  position: relative;
  height: 100vh;
    overflow-y: auto;
}
.text-left {
  text-align: left;
}
.flex {
  display: flex;
}
.between {
  justify-content: space-between;
}
.mr-1 {
  margin-right: 1rem;
}
.life {
  margin-right: 0.325rem;
  color: #6b6b6b;
}
.c-6b6b6b {
  color: #6b6b6b;
}
.domain-nickName {
  padding:.25rem .4rem;
  margin: .625rem .315rem;
  border: 1px solid #f5b435;
  border-radius: 2px;
  text-align: center;
  color: #f5b435;
  box-sizing: border-box;
  font-size: .63rem;
  border-radius: .125rem;
}
img {
  margin: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 100px;
  object-fit: cover;
  border: 1px solid #fff;
  margin-right: 0.6428rem;
}
.item,
.lawyer {
  display: flex;
  margin-left: 0.714rem;
  margin-top: 1.3571rem;
}

.lawyer-title {
  color: #daa032;
  font-size: 0.857rem;
}
.lawyer-detail {
  display: flex;
  flex-wrap: wrap;
}
#searchList{
  background-color: #fff;
}
.warpper{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    padding: 1rem;
}
.name,.current{
    width: 4.285rem;
    height: 1.5714rem;
    line-height: 1.5714rem;
    border-radius: 2px;
    border: 1px solid #bdbdbd;
    text-align: center;
    margin: 0.2rem;
}
.current{
  border:1px solid #f5b435;
  color:#f5b435;
}
</style>
